Skip to content

[3.13] ast docs: Fix description of ast.Constant (GH-134741)#134912

Merged
JelleZijlstra merged 1 commit intopython:3.13from
miss-islington:backport-381020d-3.13
May 30, 2025
Merged

[3.13] ast docs: Fix description of ast.Constant (GH-134741)#134912
JelleZijlstra merged 1 commit intopython:3.13from
miss-islington:backport-381020d-3.13

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 30, 2025

Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
(cherry picked from commit 381020d)

Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com


📚 Documentation preview 📚: https://cpython-previews--134912.org.readthedocs.build/

Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
(cherry picked from commit 381020d)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir labels May 30, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs May 30, 2025
@JelleZijlstra JelleZijlstra enabled auto-merge (squash) May 30, 2025 04:12
@JelleZijlstra JelleZijlstra merged commit f4b8cd5 into python:3.13 May 30, 2025
28 of 29 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs May 30, 2025
@miss-islington miss-islington deleted the backport-381020d-3.13 branch January 2, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants